/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package abstractmodel;

/**
 *
 * @author littlechild
 */
public class InfoValue  {
    Class  type;
    Object obj;

    public void setObj(Object obj) {
        this.obj = obj;
    }

    public void setType(Class type) {
        this.type = type;
    }

    public Class getType() {
        return type;
    }
    public double getDouble() {
        if(type.equals(Double.class))
            return ((Double)(obj)).doubleValue();
        else 
            return Double.POSITIVE_INFINITY;
    }
    public String getString() {
        return obj.toString();
    }
    @Override
    public String toString() {
        return getString();
    }
}
